package com.finance.console.entity;

import java.math.BigDecimal;
import java.util.Map;

// 分类支出
// 必须包含以下setter方法（与Service中的调用匹配）
public class StatResult {
    private String period;
    private BigDecimal totalIncome;
    private BigDecimal totalExpense;
    private BigDecimal balance;
    private Map<String, BigDecimal> categoryExpense;

    public void setPeriod(String period) {
        this.period = period;
    }

    public void setTotalIncome(BigDecimal totalIncome) {
        this.totalIncome = totalIncome;
    }

    public void setTotalExpense(BigDecimal totalExpense) {
        this.totalExpense = totalExpense;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public void setCategoryExpense(Map<String, BigDecimal> categoryExpense) {
        this.categoryExpense = categoryExpense;
    }

    // 补充getter方法供报表服务使用
    public BigDecimal getTotalIncome() {
        return totalIncome;
    }

    public BigDecimal getTotalExpense() {
        return totalExpense;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public Map<String, BigDecimal> getCategoryExpense() {
        return categoryExpense;
    }
}